package ar.com.fiuba.ElectronicCircuitAnalyst.application.api.dto;

import java.util.ArrayList;
import java.util.List;

/**
 * Data transfer object for Component class. It holds:
 * 
 * @param name
 *            the name for the component.
 * @param type
 *            type of the component.
 * @param inputsCount
 *            number of inputs for the component.
 * @param functions
 *            a list of logical functions for each component's output.
 * 
 */
public class ComponentDto {

	private String name = "";

	private String type = "";

	private Integer inputsCounts = -1;

	private List<String> functions = new ArrayList<String>();
	
	public ComponentDto() {
	}

	public ComponentDto(String name, String type, Integer inputsCounts, List<String> functions) {
		this.name = name;
		this.type = type;
		this.inputsCounts = inputsCounts;
		this.functions = functions;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Integer getInputsCounts() {
		return inputsCounts;
	}

	public void setInputsCounts(Integer inputsCounts) {
		this.inputsCounts = inputsCounts;
	}

	public List<String> getFunctions() {
		return functions;
	}

	public void addFunction(String function) {
		this.functions.add(function);
	}

	public void setFunctions(List<String> functions) {
		this.functions = functions;
	}
}
